﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BonsaiScrum.Core.Domain.Shared;

namespace BonsaiScrum.Core.Domain
{
    public class PermissionLevel : Enumeration
    {
        public static readonly PermissionLevel Disabled = new PermissionLevel(0, "Disabled");
        public static readonly PermissionLevel Developer = new PermissionLevel(1, "Developer");
        public static readonly PermissionLevel ScrumMaster = new PermissionLevel(2, "Scrum Master");
        public static readonly PermissionLevel Manager = new PermissionLevel(3, "Manager");
        

        private PermissionLevel() { }
        private PermissionLevel(int value, string displayName) : base(value, displayName) { }

        public bool IsAuthorizedFor(PermissionLevel permissionLevel)
        {
            return this.CompareTo(permissionLevel) >= 0;
        }
    }
}
